import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-04-24
 * Time:9:53
 */
public class TestDemo2 {
    public static void main(String[] args) {
        int count=3;
        while(count>0){
            Scanner scanner =new Scanner(System.in);
            String code=scanner.nextLine();
            if(code.equals("12345678")){
                System.out.println("输入正确！");
                break;
            }
            count--;
            System.out.println("输入错误，你还有"+count+"次机会！");
        }
        if(count==0){
            System.out.println("退出程序");
        }else{
            System.out.println("进入程序");
        }
    }
}
